package com.cd.music.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * @author yxl 余秀良
 * @version 1.0
 * @description: 用户角色表实体类
 * @date 2018年02月27日  下午12:03
 * @address: 四川成都
 */
@Entity
@Table(name = "UserRole")
public class UserRole implements Serializable {
    private static final long serialVersionUID = -987874229200400941L;
    /**
     * 主键id
     */
    @Id
    @Column(nullable = false, unique = true, length = 32)
    private String id;
    /**
     * 用户id
     */
    @Column(nullable = false, unique = true, length = 32)
    private String userId;
    /**
     * 角色id
     */
    @Column(nullable = false, length = 32)
    private String roleId;
    /**
     * 创建时间
     */
    @Column(name = "createTime", columnDefinition = "datetime default now()")
    private Date crateTime;
    /**
     * 备注
     */
    @Column(name = "remark", length = 200)
    private String remark;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getRoleId() {
        return roleId;
    }

    public void setRoleId(String roleId) {
        this.roleId = roleId;
    }

    public Date getCrateTime() {
        return (Date) crateTime.clone();
    }

    public void setCrateTime(Date crateTime) {
        this.crateTime = (Date) crateTime.clone();
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
}
